<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
 * Created by PhpStorm.
 * User: zhaojia
 * Date: 15-9-16
 * Time: 下午2:21
 */
class Admin extends CI_Controller{
    public function __construct(){
        parent::__construct();

        $this->load->library('session');
        if(!isset($_SESSION['username'])){
            redirect('admin/login');
        }
    }
    public function index(){
        $data['username']=$_SESSION['username'];
        $this->load->view('admin/index.html',$data);
    }

    public function news(){
        $this->load->view('admin/news.html');
    }
}